﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace HEXXTOOLS
{
    public class HEXDocument
    {
        private Dictionary<int, HexContent> mSourceDocument;

        public HEXDocument()
        {
            mSourceDocument = new Dictionary<int, HexContent>();
        }

        public void AddDocument(byte[] Reader)
        {
            for (int i = 0; i < Reader.Length; i++)
            {
                mSourceDocument.Add(i,new HexContent{ HexValue = Reader[i],CharValue = Reader[i].ToString().ToCharArray()[0]});
            }
        }

        public string WriteHex()
        {
            string result = null;
            for (int i = 0; i < mSourceDocument.Count; i++)
            {
                result += mSourceDocument[i].HexValue.ToString();
            }
            return result;
            
        }
    }
}
